package com.cnd.scm.code.generator.configuration;


import com.cnd.scm.code.generator.component.InitDB;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * @version V1.0
 * @ClassName: BeforeStartup
 * @Description:TODO()
 * @author: 李启联
 * @date: 2019-08-06 16:51
 * @Copyright: Copyright (c), 2018-2019
 * 申明：本内容未经作者本人同意,禁止外泄以及用于其他的商业项目.
 */
@Configuration
public class BeforeStartup implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private InitDB initDB;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        initDB.inItProc();
    }
}